package com.qzxy.premiumhotelsystem.mapper;

import com.qzxy.premiumhotelsystem.domain.entity.Admin;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qzxy.premiumhotelsystem.domain.vo.LoginVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
* @author 14912
* @description 针对表【admin】的数据库操作Mapper
* @createDate 2024-09-12 15:55:14
* @Entity com.qzxy.premiumhotelsystem.domain.pojo.Admin
*/
@Mapper
public interface AdminMapper extends BaseMapper<Admin> {
    /**
     * 员工登录方法
     * @param admin
     * @return
     */
    @Select("select password from admin where username = #{username}")
    String login(Admin admin);

    @Select("select * from admin where username = #{username}")
    Admin getByUsername(String username);
}




